import request from '@/utils/request'

//获取部门列表
export const getDeptList = query => {
    return request({
        url:'/oa/dept/list',
        method: 'get',
        params: query
    })
}

//编辑部门
export const editDept = data => {
    return request({
        url:'/oa/dept/editDept',
        method: 'post',
        data
    })
}

//添加部门
export const addDept = data => {
    return request({
        url: 'oa/dept/addDept',
        method: 'post',
        data
    })
}

//获取发票列表
export const getTicketList = query => {
    return request({
        url:'/oa/finance/ticketList',
        method: 'get',
        params: query
    })
}

//获取发票详情
export const getTicketInfo = query => {
    return request({
        url:'/oa/finance/ticketInfo',
        method: 'get',
        params: query
    })
}

//添加发票
export const addTicket = data => {
    return request({
        url: 'oa/finance/addTicket',
        method: 'post',
        data
    })
}

//获取城市列表
export const getCityList = query => {
    return request({
        url:'/oa/city/list',
        method: 'get',
        params: query
    })
}

//编辑城市
export const editCity = data => {
    return request({
        url: 'oa/city/editCity',
        method: 'post',
        data
    })
}

//获取限额列表
export const getLimitList = query => {
  return request({
    url:'/oa/limit/list',
    method: 'get',
    params: query
  })
}


//编辑限额
export const editLimit = data => {
  return request({
    url: 'oa/limit/edit',
    method: 'post',
    data
  })
}

//获取供应商列表
export const getSupplies = query => {
    return request({
        url:'/oa/supply/list',
        method: 'get',
        params: query
      })
}


//审核供应商
export const editSupply = data => {
    return request({
        url: 'oa/supply/edit',
        method: 'post',
        data
      })
}

//删除供应商
export const delSupply = data => {
    return request({
        url: 'oa/supply/del',
        method: 'post',
        data
      })
}

//添加汇率
export const addRate = data => {
  return request({
    url: 'oa/currency/addRate',
    method: 'post',
    data
  })
}

//编辑汇率
export const editRate = data => {
  return request({
    url: 'oa/currency/editRate',
    method: 'post',
    data
  })
}

//汇率列表
export const rateList = query =>{
  return request({
    url:'/oa/currency/list',
    method: 'get',
    params: query
  })
}
